package com.intelligence.openfeign.service.deivce;

import com.intelligence.entity.pojo.DeviceLog;
import com.intelligence.entity.pojo.MeasurementUnit;
import com.intelligence.entity.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * deviceLog的openFeign调用接口
 *
 * @Author : RulerWood
 * @Data : 2024/6/3 - 15:37
 */
@FeignClient(value = "system-device",contextId = "MeasurementUnit", path = "/device/measurementUnit")
public interface MeasuermentUnitFeignService {

    @GetMapping("/listMeasurementUnit")
    Result<List<MeasurementUnit>> listMeasurementUnit();

    @GetMapping("/getMeasurementUnit/{id}")
    Result<MeasurementUnit> getMeasurementUnit(@PathVariable(value = "id") Long id);

    /**
     * 数据的新增
     *
     * @param measurementUnit 保存对象
     * @return
     */
    @PostMapping("/saveMeasurementUnit")
    Result saveMeasurementUnit(@RequestBody MeasurementUnit measurementUnit);

    /**
     * 数据的修改
     *
     * @param measurementUnit 修改对象
     * @return
     */
    @PutMapping("/updateMeasurementUnit")
    Result updateMeasurementUnit(@RequestBody MeasurementUnit measurementUnit);

    /**
     * 删除某条数据
     *
     * @param id 数据主键
     * @return
     */
    @DeleteMapping("/deleteMeasurementUnit/{id}")
    Result deleteMeasurementUnit(@PathVariable(value = "id") Integer id);

}
